import request from '@/utils/request'

// 查询编号规则设置列表
export function listBsRule(query) {
  return request({
    url: '/sycs/bsRule/list',
    method: 'get',
    params: query
  })
}

// 查询编号规则设置详细
export function getBsRule(ruleId) {
  return request({
    url: '/sycs/bsRule/' + ruleId,
    method: 'get'
  })
}

// 查询编号规则设置详细
export function getRule(query) {
  return request({
    url: '/sycs/bsRule/getRule',
    method: 'get',
    params: query
  })
}

// 新增编号规则设置
export function addBsRule(data) {
  return request({
    url: '/sycs/bsRule',
    method: 'post',
    data: data
  })
}

// 修改编号规则设置
export function updateBsRule(data) {
  return request({
    url: '/sycs/bsRule',
    method: 'put',
    data: data
  })
}

// 删除编号规则设置
export function delBsRule(ruleId) {
  return request({
    url: '/sycs/bsRule/' + ruleId,
    method: 'delete'
  })
}


// 查询试验室树列表
export function deptTree(query) {
  return request({
    url: '/system/dept/deptTree',
    method: 'get',
    params: query
  })
}

// 查询试验室树列表
export function getRuleRes(query) {
  return request({
    url: '/sycs/bsRule/getRuleRes',
    method: 'get',
    params: query
  })
}
